﻿using System.Collections.Generic;
using System.Data;
using PPI.Entities;
using PPI.WebConsumer;
using VMind.Global;

namespace PPI.Client.Logic
{
    public class LUtility 
    {
        public static List<EUtility> SelectAllIdName()
        {
            List<EUtility> _UtilityList = new List<EUtility>();
            EUtility _Utility;

            DataSet ds = WUtility.SelectAllIdName();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                _Utility = new EUtility();
                _Utility.UtilityId = ConvertHelper.ToInt32(dr["UtilityId"]);
                _Utility.Name = ConvertHelper.Tostring(dr["Name"]);
                _UtilityList.Add(_Utility);
            }
            return _UtilityList;
        }
    }
}
